Conventional video camera sensors implement a Bayer pattern for converting light into electrical signals. Bayer pixels typically undergo a series of steps, including noise reduction, demosaicing and color space conversion before being compressed into a compressed video signal. If the video camera sensor resolution is greater than the encode resolution for the compression operation, each sensor frame must be scaled before being compressed. Conventional video cameras scale the sensor frames according to one or both of two methods. In a first method, the frame resolution is reduced in the sensor by means of binning (i.e., combining an integer number of like-colored frame samples into a single sample) or skipping (i.e., skipping an integer number of like-colored frame samples for every sample retained). In a second method, the frame resolution is reduced after demosaicing.
The second method commonly provides better image quality than the first method. A Bayer-domain image of a given resolution does not contain full color information at each sample position (i.e., pixel position) because only one color is represented at each sample position. A Bayer-domain image is similar to an image of about half the resolution with all colors know at all pixel locations. For example, if a 4-megapixel (4 MP) Bayer image is reduced by binning 2:1 horizontally and 2:1 vertically, the resulting image is a 1 MP Bayer image. The 1 MP Bayer image contains about as much detail as a ½ MP RGB image.
While the second method will give a better quality than the first method, the second method is not always practical. In particular, the second method can only be used if the sensor is fast enough to output all of the pixels within a video frame period (e.g., 1/60th to 1/24th seconds). Furthermore, a processor performing the demosaicing must be able to process at the pixel rate.
In practice, a small amount of binning and/or skipping is conventionally used in the sensor. The binning/skipping is needed to reduce the Bayer-domain pixel rate to a level low enough that (i) the sensor can output all of the pixels at the video frame rate and (ii) the demosaicing processor can process at the video frame rate. Additional scaling is done after demosaicing to scale to the video frame size.
Referring to FIGS. 1-3, diagrams of various example binning possibilities are illustrated. Each of the FIGS. 1-3 illustrate how pre-binned (initial) pixels are mapped into a Bayer set of post-binned (modified) pixels. Each of the Bayer sets is defined as two green “G” pixels, a red “R” pixel and a blue “B” pixel. To aid in explaining the illustrations, boxes and circles identify each of the red, blue and green initial pixels used to generate a corresponding modified pixel. The two green pixels in each of the Bayer sets are distinguished with a box around one G pixel and a circle around the other G pixel. The boxed green pixels in the pre-binned image are used to generate the boxed green pixel in the post-binned image. The circled green pixels in the pre-binned image are used to generate the circled green pixel in the post-binned image. The boxed blue pixels in the pre-binned image are used to generate the boxed blue pixel in the post-binned image. The boxed red pixels in the pre-binned image are used to generate the boxed red pixel in the post-binned image. The post-binned pixels are commonly used to form a final image.
Referring to FIG. 1, a diagram of a conventional 3× vertical binning of an initial set 10 of pre-binned pixels to a modified set 12 of post-binned pixels is shown. Each group 14a-14n of twelve pre-binned pixels is converted into a single Bayer set 16a-16n of four post-binned pixels as illustrated.
Referring to FIG. 2, a diagram of a conventional 2× horizontal binning of an initial set 20 of pre-binned pixels to a modified set 22 of post-binned pixels is shown. Each group 24a-24n of eight pre-binned pixels is converted into a single Bayer set 26a-26n of four post-binned pixels as illustrated.
Referring to FIG. 3, a diagram of a conventional 2× horizontal and 2× vertical binning of an initial set 30 of pre-binned pixels to a modified set 32 of post-binned pixels is shown. Each group 34a-34n of sixteen pre-binned pixels is converted into a single Bayer set 36a-36n of four post-binned pixels as illustrated.